* add test for garmin gpi speed/proximity options.
* enhance subrip test
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx version="1.0" creator="GPSBabel - https://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <time>1970-01-01T00:00:00Z</time>
+ <bounds minlat="49.794688000" minlon="9.834015000" maxlat="49.794688000" maxlon="9.834015000"/>
+ <wpt lat="49.794688000" lon="9.834015000">
+ <name>point0</name>
+ </wpt>
+</gpx>
--- /dev/null
+No,Latitude,Longitude,Name,Description,Symbol,Proximity\r
+1,49.794688,9.834015,"point0@48","point0","Waypoint",804\r
--- /dev/null
+No,Latitude,Longitude,Name,Description,Symbol,Proximity\r
+1,49.794688,9.834015,"point0@30","point0","Waypoint",804\r
compare ${REFERENCE}/spb_metro_norm_ru~gpi.csv ${TMPDIR}/spb_metro_norm_ru~gpi~gpx~gpi.csv
compare ${REFERENCE}/spb_metro_norm_ru~gpi.csv ${TMPDIR}/spb_metro_norm_ru~gpi.csv
+# speed folly
+# These should be a speed of 30 in statute units, i.e. 30 mph, 0.5 miles
+gpsbabel -i gpx -f ${REFERENCE}/gpispeed.gpx -o garmin_gpi,speed=30,proximity=0.5,units=s -F ${TMPDIR}/gpispeed_s.gpi
+compare ${REFERENCE}/gpispeed.gpi ${TMPDIR}/gpispeed_s.gpi
+gpsbabel -i gpx -f ${REFERENCE}/gpispeed.gpx -o garmin_gpi,speed=30mph,proximity=0.5mi -F ${TMPDIR}/gpispeed_mph.gpi
+compare ${REFERENCE}/gpispeed.gpi ${TMPDIR}/gpispeed_mph.gpi
+# These should show @48 (kph), 804.7m
+gpsbabel -i garmin_gpi -f ${REFERENCE}/gpispeed.gpi -o unicsv -F ${TMPDIR}/gpispeed.csv
+compare ${REFERENCE}/gpispeed_m.csv ${TMPDIR}/gpispeed.csv
+gpsbabel -i garmin_gpi,units=m -f ${REFERENCE}/gpispeed.gpi -o unicsv -F ${TMPDIR}/gpispeed_m.csv
+compare ${REFERENCE}/gpispeed_m.csv ${TMPDIR}/gpispeed_m.csv
+# These should show @30 (mph), 804.7m
+gpsbabel -i garmin_gpi,units=s -f ${REFERENCE}/gpispeed.gpi -o unicsv -F ${TMPDIR}/gpispeed_s.csv
+compare ${REFERENCE}/gpispeed_s.csv ${TMPDIR}/gpispeed_s.csv
+# interpret speed from waypoint name
+gpsbabel -i unicsv -f ${REFERENCE}/gpispeed_s.csv -o garmin_gpi,alerts,units=s -F ${TMPDIR}/gpispeed_sn.gpi
+gpsbabel -i garmin_gpi,units=s -f ${TMPDIR}/gpispeed_sn.gpi -o unicsv -F ${TMPDIR}/gpispeed_s2.csv
+compare ${REFERENCE}/gpispeed_s.csv ${TMPDIR}/gpispeed_s2.csv
+
rm -f ${TMPDIR}/subrip.srt
gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip -F ${TMPDIR}/subrip.srt
compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip.srt
-gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,gps_date=20110702,gps_time=174725.200 -F ${TMPDIR}/subrip.srt
-compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip.srt
-gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,video_time=000000,gps_date=20110702,gps_time=174725.200 -F ${TMPDIR}/subrip.srt
-compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip.srt
-gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,video_time=000000.200,gps_date=20110702,gps_time=174725.400 -F ${TMPDIR}/subrip.srt
-compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip.srt
+gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,gps_date=20110702,gps_time=174725.200 -F ${TMPDIR}/subrip2.srt
+compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip2.srt
+gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,video_time=000000,gps_date=20110702,gps_time=174725.200 -F ${TMPDIR}/subrip3.srt
+compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip3.srt
+gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,video_time=000000.200,gps_date=20110702,gps_time=174725.400 -F ${TMPDIR}/subrip4.srt
+compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip4.srt
gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,gps_date=20110702,gps_time=174725.400 -F ${TMPDIR}/subrip-shifted.srt
compare ${REFERENCE}/track/gpx_subsecond-sample-shifted~subrip.srt ${TMPDIR}/subrip-shifted.srt
+
+gpsbabel -i gpx -f ${REFERENCE}/track/gpx_subsecond-sample.gpx -o subrip,format="%s km/h %e m\n%t %l" -F ${TMPDIR}/subrip5.srt
+compare ${REFERENCE}/track/gpx_subsecond-sample~subrip.srt ${TMPDIR}/subrip5.srt